﻿using Core.DataAccess.Model.Project.Entrepot;
using System;
using System.Collections.Generic;
using System.Text;
using Core.Framework.Model.Common;
using Core.IBusiness.IEntrepotModule.Model;

namespace Core.IBusiness.IEntrepotModule
{
    /// <summary>
    /// 产品运营属性
    /// </summary>
    public interface IEntrepotOperation
    {

        /// <summary>
        /// 运营属性
        /// </summary>
        /// <param name="attrbute">属性实体</param>
        /// <param name="sqlExecType">操作类型</param>
        /// <returns></returns>
        MethodResult<int> OperationAttrbute(ProductAttrbute attrbute, SqlExecType sqlExecType);

        /// <summary>
        /// 根据属性获取产品信息
        /// </summary>
        /// <param name="projectToken">项目token</param>
        /// <param name="search">搜索内容</param>
        /// <param name="attributes">属性集合</param>
        /// <param name="pagination">分页参数</param>
        /// <returns></returns>
        MethodResult<List<ProductTemplate>> GetTemplateByAttributes(string projectToken, List<EntrepotAttributeEnum> attributes, Pagination pagination, string search = null);

        /// <summary>
        /// 获取指定属性列表
        /// </summary>
        /// <param name="projectToken">项目token</param>
        /// <param name="attributes">属性集合</param>
        /// <param name="pagination">分页参数</param>
        /// <returns></returns>
        MethodResult<List<ProductAttrbute>> GetAttributes(string projectToken, List<EntrepotAttributeEnum> attributes, Pagination pagination);

        MethodResult<ProductCardBuiderResult> GetProductCardContent(string projectToken);


    }
}
